/*
 *Description:
 *User:laoHu
 *Created with Intellij IDEA 2025
 *Data:2025.09.06
 *Time:10:04
 */

//双链表

public class Main{

    public static void main(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.addFirst(1);
        myLinkedList.addPos(0,1);
        myLinkedList.addPos(2,1);
        myLinkedList.addPos(2,1);

        myLinkedList.removeAll(1);

//        myLinkedList.clear();
        myLinkedList.display();



    }
    public static  void main2 (String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();


        myLinkedList.addFirst(1);
        myLinkedList.addPos(0,0);
        myLinkedList.display();
        System.out.println("=====");
        myLinkedList.addPos(2,3);
        myLinkedList.display();
        System.out.println("=====");
        myLinkedList.addPos(2,2);
        myLinkedList.display();

        myLinkedList.remove(2);
        myLinkedList.display();

}

    public static void main1(String[] args) {
       MyLinkedList myLinkedList = new MyLinkedList();
       myLinkedList.addFirst(12);
       myLinkedList.addFirst(23);
       myLinkedList.addFirst(34);
       myLinkedList.addFirst(45);
       myLinkedList.addFirst(56);

       myLinkedList.display();
    }
}